import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '@/views/login/Login.vue'
import Home from '@/views/home/Home.vue'
import Detail from '@/views/detail/Detail.vue'
import UserInfo from '@/views/user/UserInfo.vue'
import employerLogin from '@/views/employer/EmployerLogin.vue'
import employerInfo from '@/views/employer/EmployerInfo.vue'
Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/login' },
  { path: '/login', name: 'login', component: Login },
  { path: '/home', name: 'home', component: Home },
  { path: '/detail', name: 'detail', component: Detail },
  { path: '/user', name: 'user', component: UserInfo },
  { path: '/employer/login', name: 'employerLogin', component: employerLogin },
  { path: '/employer/userInfo', name: 'employerInfo', component: employerInfo },
]

const router = new VueRouter({
  mode: 'hash',
  routes,
  base: process.env.BASE_URL,
})

export default router
